/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.hpi.generator.model;

import de.hpi.generator.config.ColumnModel;
import de.hpi.generator.generator.storages.ValueSeriaInfo;
import de.hpi.generator.model.dependencies.ZeroInclusionDependencyCollection;

/**
 *
 * @author Michael
 */
public class TesmaColumn extends Column {

    public static final String TYPE_NAME = "Tesma";

    public TesmaColumn(ColumnModel aColumnModel, Table aOwner) throws Exception {
        super(aColumnModel, aOwner, true);
        aInclusionDependencyCollection = new ZeroInclusionDependencyCollection();
    }

    public void registerValue(Integer value) throws Exception {
        ValueSeriaInfo valueInfoToRegister = new ValueSeriaInfo(value, 1);

        if (aUniqueValuesDataStorage.isSeriaOfValueWasNotDistributed(valueInfoToRegister)) {
            appendAndRegisterValueSeriaInfo(valueInfoToRegister);
        } else {
            int aUniqueValueIndex = aUniqueValuesDataStorage.getPositionOfValue(valueInfoToRegister.getValue());
            valueInfoToRegister.setUniqueValueIndex(aUniqueValueIndex);
            appendValueSeriaInfo(valueInfoToRegister);
        }
    }

    @Override
    public void generateBaseColumnValues() throws Exception {
    }

    @Override
    public void generateAdditionalExtendedDistribution(int aNumberOfValuesToBeGenerated) throws Exception {
    }

    @Override
    public String convertToString(int aValue) throws Exception {
      return "";
    }
}
